<?php echo '<?xml version="1.0" encoding="utf-8"?>' . "\n"; ?>
<rss version="2.0">
    <channel>
        <title><?php echo xml_convert($title); ?></title>
        <link><?php echo current_url(); ?></link>
        <description><?php echo xml_convert($description); ?></description>
        <?php if (isset($posts) && !empty($posts)) { ?>
            <?php foreach ($posts as $post) { ?>
                <item>
                    <title><?php echo xml_convert($post->wallpaper_name); ?></title>
                    <?php $search_replace = array('{C_SLUG_FULL}' => $post->cFullSlug, '{C_SLUG}' => $post->category_slug, '{W_SLUG}' => $post->wallpaper_slug, '{W_HASH}' => $post->wallpaper_hash); ?>
                    <?php $front_link = $this->route_links->build_link('wallpaper_page', $search_replace); ?>
                    <link><?php echo $front_link; ?></link>
                    <description>&lt;a href="<?php echo $front_link; ?>"&gt;&lt;img
                        border="0"
                        src="<?php echo $this->image_workshop->crop_image(ORIGINALS_FOLDER_WF . '/' . $post->wallpaper_image_path, 225, 150, $post->wallpaper_crop_position, 'thumbnail'); ?>
                        "&gt;&lt;/a&gt;</description>
                    <pubdate><?php echo $post->wallpaper_date_created; ?></pubdate>
                </item>
            <?php } ?>
        <?php } ?>
    </channel>
</rss>